import request from '@/utils/request'

// 获取学年列表
export function listYear() {
  return request({
    url: '/system/student/list',
    method: 'get',
  })
}
// 获取学院列表
export function listCollege(data){
  return request({
    url: '/org/college/getCollegeByYearID',
    method: 'post',
    data:data
  })
}
// 获取专业列表
export function listMajor() {
  return request({
    url: '/system/student/list',
    method: 'get',
  })
}
// 获取班级列表
export function listClasses() {
  return request({
    url: '/system/student/list',
    method: 'get',
  })
}

// 查询学生信息列表
export function listStudent(query) {
  return request({
    url: '/system/student/list',
    method: 'get',
    params: query
  })
}

// 查询学生信息详细
export function getStudent(id) {
  return request({
    url: '/system/student/' + id,
    method: 'get'
  })
}

// 新增学生信息
export function addStudent(data) {
  return request({
    url: '/system/student',
    method: 'post',
    data: data
  })
}

// 修改学生信息
export function updateStudent(data) {
  return request({
    url: '/system/student/update',
    method: 'post',
    data: data
  })
}

// 删除学生信息
export function delStudent(id) {
  return request({
    url: '/system/student/delete/' + id,
    method: 'post'
  })
}

// 导出学生信息
export function exportStudent(query) {
  return request({
    url: '/system/student/export',
    method: 'get',
    params: query
  })
}
